<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<div id="box"></div>
<script>
function Father(name){
    this.name = name;
}
Father.prototype.speak = function (){
    console.log("我是father中的方法...");
}

function Son(age){
    this.age = age;
}

var f = new Father("李四");
Son.prototype = f;
Son.prototype.constructor = Son;
var s = new Son(20);
console.log(s.age);
console.log(s.name);
s.speak()
console.log(s.toString());
console.log(Son.prototype.constructor);

console.log(s instanceof Son);
console.log(s instanceof Father);
console.log(s instanceof Object);
console.log(f instanceof Son);
</script>
</body>
</html>